from rest_framework import serializers
from .models import Movie


class MovieSerializer(serializers.ModelSerializer):
    """电影序列化器类"""

    class Meta:
        model = Movie  # 关联的模型
        fields = ["id", "title", "genres"]  # 序列化的字段
